<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <title></title>
        <#include "/inc/head.ftl"/>
    	<@head/> 
</head>
<body>
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="row">
						<div class="col-lg-12">
                            <form id="form" action="${contextPath}/customer/save" method="post">
                            
                                       <div class="form-group">
                                            <label>客户编号</label>
                                            <input id="customerNumber" name="customer.customerNumber" value="${(customerNumber)!}" class="form-control" readonly="readonly">
                                        </div>
                                        
                                        <div class="form-group">
                                            <label>客户姓名</label>
                                            <input id="customerName" name="customer.customerName"  class="form-control" >
                                        </div>
                                        
                                        <div class="form-group">
                                            <label>客户性别</label>
                                            <input type="hidden" name="customer.customerSex" id="customerSex" value="">
                                            <input name="customerSex" type="radio" value="男" checked="checked">男
                                            <input name="customerSex" type="radio" value="女" >女 
                                        </div>
                                        
                                        <div class="form-group">
                                            <label>客户年龄</label>
                                            <input id="customerAge" name="customer.customerAge"  class="form-control">
                                        </div>
                                        
                                        <div class="form-group">
                                            <label>客户号码</label>
                                            <input id="customerPhone" name="customer.customerPhone"  class="form-control">
                                        </div>
                                        
                                        <div class="form-group">
                                            <label>客户备注</label>
                                            <input id="remarks" name="customer.remarks" class="form-control">
                                        </div>
                                   
                                
                                <div align="right">
                                <button id="btn-submit"  type="submit"  class="btn btn-default" >提交</button>
                                <button id="btn-reset" type="reset" class="btn btn-default">重置</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <!-- /.panel-body -->
       </div>
       <!-- /.panel -->
       
      <script>
      $('input[type=radio]').change(function() {
      	var m = $(this).val();//获取选中的值
          $("#customerSex").val(m);//把值保存到questi控件里面  
      });
      
       $(function() {
           $('form').validate({
               submitHandler : function(form) {
		               $(form).ajaxSubmit(function(data) {
		                   if(data.result){
		                	   parent.layer.msg(data.msg, {time: 1000, icon:1});			                	   
		                   }else{
		                	   parent.layer.msg(data.msg, {time: 1000, icon:2});	
		                   }  
		                   var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
    		        	   parent.layer.close(index); 
		               });
               }
           });
           
       });
    </script>
    </body>
</html>    	 
    	 
    	 
    	 
    	 
    	 
    	 
    	   

